<#setting number_format="#">
/*
 * Copyright ${.now?string("yyyy")} the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package ${app.packageName}.bean;

import org.apache.commons.lang3.builder.ToStringBuilder;

import java.io.Serializable;

/**
 * <#if api.description?? && (api.description?length > 0)>${api.description}<br></#if>
 *
 * ${api.name?cap_first}UpdateBean generated By CrudMojo on ${.now?string("yyyy/MM/dd a HH:mm")}
 *
 * @author ${app.author!"YMP (https://www.ymate.net/)"}
 * @version ${app.version!"1.0.0"}
 */
public class ${api.name?cap_first}UpdateBean implements Serializable {

    private static final long serialVersionUID = 1L;

<#list normalFields as p><#if p.config?? && p.config.createOrUpdate?? && p.config.createOrUpdate.enabled><#if (p.description??)>
    /**
     * ${p.description}
     */</#if>
    private ${p.type} ${p.name};</#if>

</#list><#list normalFields as p><#if p.config?? && p.config.createOrUpdate?? && p.config.createOrUpdate.enabled>
    public ${p.type} get${p.name?cap_first}() {
        return ${p.name};
    }

    public void set${p.name?cap_first}(${p.type} ${p.name}) {
        this.${p.name} = ${p.name};
    }

</#if></#list><#if (normalFields?size > 0)>
    @Override
    public String toString() {
        return new ToStringBuilder(this)<#list normalFields as p><#if p.config?? && p.config.createOrUpdate?? && p.config.createOrUpdate.enabled>
            .append("${p.name}", ${p.name})</#if></#list>
        .toString();
    }

    public Builder bind() {
        return new Builder(this);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static class Builder {

        private final ${api.name?cap_first}UpdateBean targetBean;

        public Builder() {
            targetBean = new ${api.name?cap_first}UpdateBean();
        }

        public Builder(${api.name?cap_first}UpdateBean targetBean) {
            this.targetBean = targetBean;
        }

        public ${api.name?cap_first}UpdateBean build() {
            return targetBean;
        }<#list normalFields as p><#if p.config?? && p.config.createOrUpdate?? && p.config.createOrUpdate.enabled>

        public ${p.type} ${p.name}() {
            return targetBean.get${p.name?cap_first}();
        }

        public Builder ${p.name}(${p.type} ${p.name}) {
            targetBean.set${p.name?cap_first}(${p.name});
            return this;
        }</#if></#list>
    }</#if>
}